package com.ims.repository;

import com.ims.entity.ScholarShipEntity;
        import org.springframework.data.domain.Page;
        import org.springframework.data.domain.Pageable;
        import org.springframework.data.jpa.repository.JpaRepository;
        import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ScholarShipRepository  extends JpaRepository<ScholarShipEntity,Integer>{
    @Query("select sc from ScholarShipEntity sc join sc.student s " +
            " where s.major like?1 and s.stuClass like ?2")
    Page<ScholarShipEntity> getscholarinfo(String major, String aClass,Pageable page);
}
